package com.bookshop.entity;

import java.io.Serializable;
import java.util.Date;



/**
 * 订单实体类
 * @author aiden
 *
 */
public class Order implements Serializable{
	private static final long serialVersionUID = 4107846268825390838L;
	private long orderId;   //自增ID
	private String orderNo; //订单号
	private int userId;     //用户ID

	private Date createTime;//下单时间	
	private int orderStatus;//订单状态(-3:用户拒收 -2:未付款的订单 -1：用户取消 0:待发货 1:配送中  2:用户确认收货)
	private int payType;// 支付方式(0:货到付款 1:在线支付)
	private int payFrom;// 支付来源(1:支付宝，2：微信)
	private int isPay;  // 是否支付(0:未支付 1:已支付)
	private String userName;// 收货人名称
	private String userAddress; // 收件人地址
	private String userPhone;   // 收件人手机
	private int isAppraise;     // 是否点评(0:未点评 1:已点评)
	private int dataFlag;       // 订单有效标志(-1：删除 1:有效)
	private int deliverType;    // 收货方式(0:送货上门 1:自提)
	private String orderRemarks;// 订单备注
	
	private double deliverMoney;  //运费
	private double totalMoney;    //订单总金额(包括运费)
	private double realTotalMoney;//实际订单总金额(进行各种折扣之后的金额)
	private double goodsMoney;    //商品总金额	商品总价格(未进行任何折扣的总价格)
	
	public Order() {
		super();
	}
 
 
	public Order(long orderId, String orderNo, int userId, Date createTime,
			int orderStatus, int payType, int isPay, int deliverType,
			double deliverMoney, double totalMoney, double realTotalMoney) {
		super();
		this.orderId = orderId;
		this.orderNo = orderNo;
		this.userId = userId;
		this.createTime = createTime;
		this.orderStatus = orderStatus;
		this.payType = payType;
		this.isPay = isPay;
		this.deliverType = deliverType;
		this.deliverMoney = deliverMoney;
		this.totalMoney = totalMoney;
		this.realTotalMoney = realTotalMoney;
	}
 
	public Order(String orderNo, int userId, Date createTime, String userName,
			String userAddress, String userPhone, String orderRemarks,
			double deliverMoney, double totalMoney, double realTotalMoney,
			double goodsMoney) {
		super();
		this.orderNo = orderNo;
		this.userId = userId;
		this.createTime = createTime;
		this.userName = userName;
		this.userAddress = userAddress;
		this.userPhone = userPhone;
		this.orderRemarks = orderRemarks;
		this.deliverMoney = deliverMoney;
		this.totalMoney = totalMoney;
		this.realTotalMoney = realTotalMoney;
		this.goodsMoney = goodsMoney;
		
	}

	/**
	 * 带参构造
	 * @param orderNo 订单号
	 * @param userId 用户ID
	 * @param totalMoney 订单总金额
	 * @param userName 收货人名称
	 * @param userAddress 收件人地址
	 * @param userPhone 收件人手机  
	 */
	public Order(String orderNo, int userId, double totalMoney,
			String userName, String userAddress, String userPhone) {
		super();
		this.orderNo = orderNo;
		this.userId = userId;
		this.totalMoney = totalMoney;		 
		this.userName = userName;
		this.userAddress = userAddress;
		this.userPhone = userPhone;
		 
	}
	
	
	public double getRealTotalMoney() {
		return realTotalMoney;
	}
	public void setRealTotalMoney(double realTotalMoney) {
		this.realTotalMoney = realTotalMoney;
	}
	public double getGoodsMoney() {
		return goodsMoney;
	}
	public void setGoodsMoney(double goodsMoney) {
		this.goodsMoney = goodsMoney;
	}
	public long getOrderId() {
		return orderId;
	}
	public void setOrderId(long orderId) {
		this.orderId = orderId;
	}
	public String getOrderNo() {
		return orderNo;
	}
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public double getTotalMoney() {
		return totalMoney;
	}
	public void setTotalMoney(double totalMoney) {
		this.totalMoney = totalMoney;
	}
	public int getOrderStatus() {
		return orderStatus;
	}
	public void setOrderStatus(int orderStatus) {
		this.orderStatus = orderStatus;
	}
	public int getPayType() {
		return payType;
	}
	public void setPayType(int payType) {
		this.payType = payType;
	}
	public int getPayFrom() {
		return payFrom;
	}
	public void setPayFrom(int payFrom) {
		this.payFrom = payFrom;
	}
	public int getIsPay() {
		return isPay;
	}
	public void setIsPay(int isPay) {
		this.isPay = isPay;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getUserAddress() {
		return userAddress;
	}
	public void setUserAddress(String userAddress) {
		this.userAddress = userAddress;
	}
	public String getUserPhone() {
		return userPhone;
	}
	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}
	public String getOrderRemarks() {
		return orderRemarks;
	}
	public void setOrderRemarks(String orderRemarks) {
		this.orderRemarks = orderRemarks;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public int getIsAppraise() {
		return isAppraise;
	}
	public void setIsAppraise(int isAppraise) {
		this.isAppraise = isAppraise;
	}
	public int getDataFlag() {
		return dataFlag;
	}
	public void setDataFlag(int dataFlag) {
		this.dataFlag = dataFlag;
	}
	public int getDeliverType() {
		return deliverType;
	}
	public void setDeliverType(int deliverType) {
		this.deliverType = deliverType;
	}
	public double getDeliverMoney() {
		return deliverMoney;
	}
	public void setDeliverMoney(double deliverMoney) {
		this.deliverMoney = deliverMoney;
	}
 

}
